<?php
	header("content-type:text/html;charset=utf-8");
    /******************************************************************************
     *    Copyright ZhangYue
     * Author:                Quinn Xu
     * Description:           
     * Want argument:         
     * Output:                
     * Create Date:           2012-11-23
     *****************************************************************************/
	define('DOMAIN','localhost/liyunqin/');//站点根目录
	define('HOMEPAGE','http://'.DOMAIN.'uindex.php');//后台首页
	define('PUBLIC_DIR','http://' . DOMAIN . 'public/');//public文件夹路径
	define('ROOT','./');
	define('SITEROOT','./');
	define('LIBS_DIR',ROOT.'libs/');//扩展文件夹
	define('SMARTY_DIR',ROOT . 'libs/Smarty/libs/');//smarty路径
	define('TEMPLATES',SITEROOT . 'templates/');//模板路径
	define('DATACLASS',SITEROOT . 'dataclass/');//数据库操作类路径
	define('DB_HOST','localhost');//数据库主机
	define('DB_USER','root');//数据库用户名
	define('DB_PWD','');//数据库密码
	define('DB_PORT',3306);//数据库端口
	define('DB_DB','liyunqin');//数据库
	
	include_once LIBS_DIR . 'basic/data/Database.php';
	$db = new Database(DB_HOST, DB_USER, DB_PWD, DB_PORT, DB_DB);
// 	$array = array('ii','id','id2');
// 	$fields = array('userName','passWord');
// 	$db->prepare('select * from user where id in (?,?)',$array);
// 	$db->getStmtResult(array(1,3),123);
// 	$db = new mysqli(DB_HOST,DB_USER,DB_PWD,DB_DB,DB_PORT);
// 	$db->set_charset('utf8');
// 	$db = mysql_connect(DB_HOST,DB_USER,DB_PWD);
// 	mysql_set_charset('utf8');
// 	mysql_select_db(DB_DB);
	include_once SMARTY_DIR . 'Smarty.class.php';//引入smarty
	$smarty = new Smarty();
	$smarty->debugging = false;
	$smarty->left_delimiter = '{*';
	$smarty->right_delimiter = '*}';
	$smarty->template_dir = TEMPLATES;
	
?>